<?php


namespace App\Model;


/**
 * App\Model\GoodsView
 *
 * @property int $id
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property int $goods_id 商品id
 * @property int|null $user_id 用户id
 * @property string $ip ip
 * @property int $time 时间戳
 * @property-read \App\Model\Goods $goods
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView whereGoodsId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView whereIp($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView whereTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\GoodsView whereUserId($value)
 * @mixin \Eloquent
 */
class GoodsView extends Base
{

    protected $table='goods_view';

    protected $fillable=['goods_id','user_id','ip','time'];


    function goods(){


        return $this->belongsTo(Goods::class,'goods_id','id');
    }

}
